package com.happy.zebra.admin.mapper;

import com.happy.zebra.admin.api.entity.AssistPermission;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

public interface AssistPermissionMapper {

	/**
	 * 获取教师教辅权限信息
	 *
	 * @param teacherId 教师 ID
	 * @return {@link AssistPermission}
	 * @author nianhua.jiang
	 * @date 2021/2/2 15:11
	 **/
	AssistPermission getAssistPermission(@Param("teacherId") String teacherId, @Param("type") String type);

	List<AssistPermission> getAssistPermissions(@Param("teacherId") String teacherId);

	long getTryDuration();

	int insertAssistPermission(@Param("teacherId") String teacherId, @Param("type") String type, @Param("startTime") LocalDateTime startTime, @Param("duration") long duration, @Param("endTime") LocalDateTime endTime);
}
